package vip.kqsy.cloud.ai.server.config;

import com.alibaba.dashscope.aigc.generation.Generation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.kqsy.cloud.ai.sdk.qw.TwFactory;

@Configuration
public class AiConfig {

    @Value("${ai.gpt.key}")
    private String key;

    @Bean
    public Generation gptService() {
        return TwFactory.of(key);
    }
}
